package com.heima.comment.config;

import com.heima.comment.limiter.RequestLimiter;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.core.StringRedisTemplate;

@Configuration
public class RequestLimiterConfig {

    @Bean
    public RequestLimiter requestLimiter(StringRedisTemplate redisTemplate) {
        return new RequestLimiter(redisTemplate);
    }
}